<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>MCUXpresso SDK API Reference Manual: CSI: CMOS Sensor Interface</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="fs_logo.gif"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">MCUXpresso SDK API Reference Manual
   &#160;<span id="projectnumber">Rev. 0</span>
   </div>
   <div id="projectbrief">NXP Semiconductors</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>API&#160;Reference</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__csi__driver.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#enum-members">Enumerations</a>  </div>
  <div class="headertitle">
<div class="title">CSI: CMOS Sensor Interface</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Overview</h2>
<p>The MCUXpresso SDK provides a driver for the CMOS Sensor Interface (CSI)</p>
<p>The CSI enables the chip to connect directly to external CMOS image sensors. The CSI driver provides functional APIs and transactional APIs for the CSI module. The functional APIs implement the basic functions, so user can construct them for a special use case. The transactional APIs provide a queue mechanism in order for the user to submit an empty frame buffer and get a fully-filled frame buffer easily.</p>
<h1><a class="anchor" id="CSIFBQ"></a>
Frame Buffer Queue</h1>
<p>The CSI transactional functions maintain a frame buffer queue. The queue size is defined by the macro CSI_DRIVER_QUEUE_SIZE. The queue size is 4 by default, but the user can override it by re-defining the macro value in the project setting.<br/>
 To use transactional APIs, first call <a class="el" href="group__csi__driver.html#gaff15e4c1cd458f686e4f296ce3d417d5">CSI_TransferCreateHandle</a> to create a handle to save the CSI driver state. This function initializes the frame buffer queue to empty status.<br/>
 After the handle is created, the function <a class="el" href="group__csi__driver.html#ga807a6677a22856cf8ad1e37253b14d44">CSI_TransferSubmitEmptyBuffer</a> can be used to submit the empty frame buffer to the queue. If the queue does not have room to save the new empty frame buffers, this function returns with an error. It is not necessary to check the queue rooms before submitting an empty frame buffer. After this step, the application can call <a class="el" href="group__csi__driver.html#ga65a17c86c64297a09857e435588a65d6">CSI_TransferStart</a> to start the transfer. There must be at least two empty buffers in the queue, otherwise this function returns an error. The incoming frames are saved to the empty buffers one by one, and a callback is provided when every frame completed. To get the fully-filled frame buffer, call the function <a class="el" href="group__csi__driver.html#ga36f7bf646f55c098fb12d6fa387d6424">CSI_TransferGetFullBuffer</a>. This function returns an error if the frame buffer queue does not have full buffers. Therefore, it is not necessary to check the full buffer number in the queue before this function.<br/>
 To stop the transfer, call the function <a class="el" href="group__csi__driver.html#gac20498234465760225985287ff862751">CSI_TransferStop</a> at anytime. If the queue has some full frame buffers, the application can still read them out after this stop function.<br/>
 During the transfer, if all empty buffers are fully-filled, the CSI module will be stopped silently. Be aware that the stop here is different with the stop by <a class="el" href="group__csi__driver.html#gac20498234465760225985287ff862751">CSI_TransferStop</a>. When the application submits new buffers to the queue and the queue has more than two empty buffers, the CSI module starts automatically to same frame to the empty buffer.<br/>
 </p>
<h1><a class="anchor" id="CSICase"></a>
Typical use case</h1>
<h2><a class="anchor" id="CSICaseFunc"></a>
Receive with functional APIs</h2>
<p>In this example, the CSI is enabled to save 10 frames.</p>
<div class="fragment"><div class="line">uint32_t frameBuffers[10][320][240];</div>
<div class="line"><span class="keyword">volatile</span> uint32_t frameIdx = 0;</div>
<div class="line"><span class="keyword">volatile</span> uint32_t frameRecv = 0;</div>
<div class="line"></div>
<div class="line"><span class="keywordtype">void</span> CSI_IRQHandler(<span class="keywordtype">void</span>)</div>
<div class="line">{</div>
<div class="line">    uint32_t intStat = <a class="code" href="group__csi__driver.html#gac756a072ac5afdb9567632d02d13e73f">CSI_GetStatusFlags</a>(CSI);</div>
<div class="line"></div>
<div class="line">    <span class="keywordflow">if</span> (frameIdx &lt; 10)</div>
<div class="line">    {</div>
<div class="line">        <span class="keywordflow">if</span> (intStat &amp; <a class="code" href="group__csi__driver.html#ggac962030ce8597d68455e55874a51721fa3168d94660e46e761c0639a1a20b74ee">kCSI_RxBuffer0DmaDoneFlag</a>)</div>
<div class="line">        {</div>
<div class="line">            <a class="code" href="group__csi__driver.html#ga17f23deb7d61ad8d88b10165e512d50d">CSI_SetRxBufferAddr</a>(CSI, 0, (uint32_t)frameBuffer[frameIdx++]);</div>
<div class="line">        }</div>
<div class="line"></div>
<div class="line">        <span class="keywordflow">if</span> (intStat &amp; <a class="code" href="group__csi__driver.html#ggac962030ce8597d68455e55874a51721fa27f18871d1b522ca628722a3fb80b89d">kCSI_RxBuffer1DmaDoneFlag</a>)</div>
<div class="line">        {</div>
<div class="line">            <a class="code" href="group__csi__driver.html#ga17f23deb7d61ad8d88b10165e512d50d">CSI_SetRxBufferAddr</a>(CSI, 1, (uint32_t)frameBuffer[frameIdx++]);</div>
<div class="line">        }</div>
<div class="line">    }</div>
<div class="line"></div>
<div class="line">    <a class="code" href="group__csi__driver.html#ga9368862568891bbdb29b0a6287801506">CSI_ClearStatusFlags</a>(CSI, kCSI_RxBuffer0DmaDoneFlag | kCSI_RxBuffer1DmaDoneFlag);</div>
<div class="line"></div>
<div class="line">    frameRecv ++;</div>
<div class="line">}</div>
<div class="line"></div>
<div class="line"><span class="keywordtype">void</span> main(<span class="keywordtype">void</span>)</div>
<div class="line">{</div>
<div class="line">    <span class="comment">/* Initialize the CSI first. */</span></div>
<div class="line">    <span class="keyword">const</span> <a class="code" href="group__csi__driver.html#structcsi__config__t">csi_config_t</a> csiConfig =</div>
<div class="line">    {</div>
<div class="line">        <span class="comment">// ...</span></div>
<div class="line">    };</div>
<div class="line"></div>
<div class="line">    <a class="code" href="group__csi__driver.html#ga6ab1581b894e0addd36e259454d894fb">CSI_Init</a>(CSI, &amp;csiConfig);</div>
<div class="line"></div>
<div class="line">    <a class="code" href="group__csi__driver.html#ga433cf3d4d36b2d602b2e41b415abd85f">CSI_EnableInterrupts</a>(CSI, <a class="code" href="group__csi__driver.html#gga445b9c8db2ffe230018ced411b88cc3eab51980279060e64d99dea0b615b1a6eb">kCSI_RxBuffer1DmaDoneInterruptEnable</a> | <a class="code" href="group__csi__driver.html#gga445b9c8db2ffe230018ced411b88cc3eaa93e6aebf81cc468b6827ecae5e996e3">kCSI_RxBuffer0DmaDoneInterruptEnable</a>);</div>
<div class="line"></div>
<div class="line">    <span class="comment">/* Set frame buffer address to CSI. */</span></div>
<div class="line">    <a class="code" href="group__csi__driver.html#ga17f23deb7d61ad8d88b10165e512d50d">CSI_SetRxBufferAddr</a>(CSI, 0, (uint32_t)frameBuffer[frameIdx++]);</div>
<div class="line">    <a class="code" href="group__csi__driver.html#ga17f23deb7d61ad8d88b10165e512d50d">CSI_SetRxBufferAddr</a>(CSI, 1, (uint32_t)frameBuffer[frameIdx++]);</div>
<div class="line"></div>
<div class="line">    <a class="code" href="group__csi__driver.html#gace757ddd954a29a1a11c0bdc119b17ad">CSI_Start</a>(TEST_CSI);</div>
<div class="line"></div>
<div class="line">    <span class="keywordflow">while</span> (frameRecv &lt; 10)</div>
<div class="line">    {</div>
<div class="line">    }</div>
<div class="line"></div>
<div class="line">    <a class="code" href="group__csi__driver.html#gaaef95a89e63407cdb28b9dbf81ce4fe5">CSI_DisableInterrupts</a>(CSI, <a class="code" href="group__csi__driver.html#gga445b9c8db2ffe230018ced411b88cc3eab51980279060e64d99dea0b615b1a6eb">kCSI_RxBuffer1DmaDoneInterruptEnable</a> | <a class="code" href="group__csi__driver.html#gga445b9c8db2ffe230018ced411b88cc3eaa93e6aebf81cc468b6827ecae5e996e3">kCSI_RxBuffer0DmaDoneInterruptEnable</a>);</div>
<div class="line">    <a class="code" href="group__csi__driver.html#ga49731f4255e64f48eb0f26628296c13e">CSI_Stop</a>(TEST_CSI);</div>
<div class="line">}</div>
</div><!-- fragment --><h2><a class="anchor" id="CSICaseTrans"></a>
Receive with transactional APIs</h2>
<p>This example shows how to receive the frame using CSI driver transactional APIs.</p>
<div class="fragment"><div class="line"><span class="preprocessor">#define FRAME_BUFFER_CNT 3</span></div>
<div class="line"><span class="preprocessor"></span></div>
<div class="line">uint32_t frameBuffers[FRAME_BUFFER_CNT][320][240];</div>
<div class="line">csi_handle_t handle;</div>
<div class="line">uint32_t bufferToProcess;</div>
<div class="line"></div>
<div class="line"><span class="keywordtype">void</span> main(<span class="keywordtype">void</span>)</div>
<div class="line">{</div>
<div class="line">    uint32_t i;</div>
<div class="line"></div>
<div class="line">    <span class="comment">/* Initialize the CSI first. */</span></div>
<div class="line">    <span class="keyword">const</span> <a class="code" href="group__csi__driver.html#structcsi__config__t">csi_config_t</a> csiConfig =</div>
<div class="line">    {</div>
<div class="line">        <span class="comment">// ...</span></div>
<div class="line">    };</div>
<div class="line"></div>
<div class="line">    <a class="code" href="group__csi__driver.html#ga6ab1581b894e0addd36e259454d894fb">CSI_Init</a>(CSI, &amp;csiConfig);</div>
<div class="line"></div>
<div class="line">    <span class="comment">/* Create the handle. */</span></div>
<div class="line">    <a class="code" href="group__csi__driver.html#gaff15e4c1cd458f686e4f296ce3d417d5">CSI_TransferCreateHandle</a>(CSI, &amp;handle, NULL, NULL);</div>
<div class="line"></div>
<div class="line">    <span class="comment">/* Put the buffer to the queue. */</span></div>
<div class="line">    <span class="keywordflow">for</span> (i=0; i&lt;FRAME_BUFFER_CNT; i++)</div>
<div class="line">    {</div>
<div class="line">        <a class="code" href="group__csi__driver.html#ga807a6677a22856cf8ad1e37253b14d44">CSI_TransferSubmitEmptyBuffer</a>(CSI, &amp;handle, (uint32_t)(frameBuffers[i]));</div>
<div class="line">    }</div>
<div class="line"></div>
<div class="line">    <span class="comment">/* Start transfer. */</span></div>
<div class="line">    <a class="code" href="group__csi__driver.html#ga65a17c86c64297a09857e435588a65d6">CSI_TransferStart</a>(CSI, &amp;handle);</div>
<div class="line"></div>
<div class="line">    <span class="keywordflow">while</span> (1)</div>
<div class="line">    {</div>
<div class="line">        <span class="comment">/* Wait to get the full frame buffer. */</span></div>
<div class="line">        <span class="keywordflow">while</span> (kStatus_Success != <a class="code" href="group__csi__driver.html#ga36f7bf646f55c098fb12d6fa387d6424">CSI_TransferGetFullBuffer</a>(CSI, &amp;handle, &amp;bufferToProcess))</div>
<div class="line">        {</div>
<div class="line">        }</div>
<div class="line"></div>
<div class="line">        <span class="comment">/* Now bufferToProcess points to the full-filled buffer, could start process. */</span></div>
<div class="line">        <span class="comment">// ...</span></div>
<div class="line"></div>
<div class="line">        <span class="comment">/* Process finished, put the buffer back to the queue. */</span></div>
<div class="line">        <a class="code" href="group__csi__driver.html#ga807a6677a22856cf8ad1e37253b14d44">CSI_TransferSubmitEmptyBuffer</a>(CSI, &amp;handle, bufferToProcess);</div>
<div class="line">    }</div>
<div class="line">}</div>
</div><!-- fragment --><p>In this example, there is only 3 buffers, the CSI driver queue size is 4, so it is not necessary to check queue room before submit the empty buffer. </p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:structcsi__config__t"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__csi__driver.html#structcsi__config__t">csi_config_t</a></td></tr>
<tr class="memdesc:structcsi__config__t"><td class="mdescLeft">&#160;</td><td class="mdescRight">Configuration to initialize the CSI module.  <a href="group__csi__driver.html#structcsi__config__t">More...</a><br/></td></tr>
<tr class="separator:structcsi__config__t"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:struct__csi__handle"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__csi__driver.html#struct__csi__handle">csi_handle_t</a></td></tr>
<tr class="memdesc:struct__csi__handle"><td class="mdescLeft">&#160;</td><td class="mdescRight">CSI handle structure.  <a href="group__csi__driver.html#struct__csi__handle">More...</a><br/></td></tr>
<tr class="separator:struct__csi__handle"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ga6f3f169f7ba5517e946634a28add89e1"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__csi__driver.html#ga6f3f169f7ba5517e946634a28add89e1">CSI_DRIVER_QUEUE_SIZE</a>&#160;&#160;&#160;4U</td></tr>
<tr class="memdesc:ga6f3f169f7ba5517e946634a28add89e1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Size of the frame buffer queue used in CSI transactional function.  <a href="#ga6f3f169f7ba5517e946634a28add89e1">More...</a><br/></td></tr>
<tr class="separator:ga6f3f169f7ba5517e946634a28add89e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ga68a7e9c86a91b7ffb6547cf762ef6f3f"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__csi__driver.html#ga68a7e9c86a91b7ffb6547cf762ef6f3f">csi_transfer_callback_t</a> )(CSI_Type *base, csi_handle_t *handle, status_t status, void *userData)</td></tr>
<tr class="memdesc:ga68a7e9c86a91b7ffb6547cf762ef6f3f"><td class="mdescLeft">&#160;</td><td class="mdescRight">CSI transfer callback function.  <a href="#ga68a7e9c86a91b7ffb6547cf762ef6f3f">More...</a><br/></td></tr>
<tr class="separator:ga68a7e9c86a91b7ffb6547cf762ef6f3f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:gae4f8083589858f5dbdd0046f5bdd4f97"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__csi__driver.html#gae4f8083589858f5dbdd0046f5bdd4f97">_csi_status</a> { <br/>
&#160;&#160;<a class="el" href="group__csi__driver.html#ggae4f8083589858f5dbdd0046f5bdd4f97a14ddc6ba82ee752fdfe1f4b0e64d5533">kStatus_CSI_NoEmptyBuffer</a> = MAKE_STATUS(kStatusGroup_CSI, 0), 
<br/>
&#160;&#160;<a class="el" href="group__csi__driver.html#ggae4f8083589858f5dbdd0046f5bdd4f97a4fb022ca8ae559e96d18524e7ea09a5f">kStatus_CSI_NoFullBuffer</a> = MAKE_STATUS(kStatusGroup_CSI, 1), 
<br/>
&#160;&#160;<a class="el" href="group__csi__driver.html#ggae4f8083589858f5dbdd0046f5bdd4f97a6517cec370f757b84ba21eb690e51635">kStatus_CSI_QueueFull</a> = MAKE_STATUS(kStatusGroup_CSI, 2), 
<br/>
&#160;&#160;<a class="el" href="group__csi__driver.html#ggae4f8083589858f5dbdd0046f5bdd4f97ac9a47e7b267d5ece60e04306d2e245d2">kStatus_CSI_FrameDone</a> = MAKE_STATUS(kStatusGroup_CSI, 3)
<br/>
 }</td></tr>
<tr class="memdesc:gae4f8083589858f5dbdd0046f5bdd4f97"><td class="mdescLeft">&#160;</td><td class="mdescRight">Error codes for the CSI driver.  <a href="group__csi__driver.html#gae4f8083589858f5dbdd0046f5bdd4f97">More...</a><br/></td></tr>
<tr class="separator:gae4f8083589858f5dbdd0046f5bdd4f97"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5539d9ae21ae84983a8ed9418c83cc5f"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__csi__driver.html#ga5539d9ae21ae84983a8ed9418c83cc5f">csi_work_mode_t</a> { <br/>
&#160;&#160;<a class="el" href="group__csi__driver.html#gga5539d9ae21ae84983a8ed9418c83cc5fab707b88b2c5b3ca70afe6b78f2988571">kCSI_GatedClockMode</a> = CSI_CSICR1_GCLK_MODE(1U), 
<br/>
&#160;&#160;<a class="el" href="group__csi__driver.html#gga5539d9ae21ae84983a8ed9418c83cc5faefff73d6d0ed48e20bb12df629036633">kCSI_NonGatedClockMode</a> = 0U, 
<br/>
&#160;&#160;<a class="el" href="group__csi__driver.html#gga5539d9ae21ae84983a8ed9418c83cc5fabab5a5dfbcc1c77bc66513760fdb0ddf">kCSI_CCIR656ProgressiveMode</a> = CSI_CSICR1_CCIR_EN(1U)
<br/>
 }</td></tr>
<tr class="memdesc:ga5539d9ae21ae84983a8ed9418c83cc5f"><td class="mdescLeft">&#160;</td><td class="mdescRight">CSI work mode.  <a href="group__csi__driver.html#ga5539d9ae21ae84983a8ed9418c83cc5f">More...</a><br/></td></tr>
<tr class="separator:ga5539d9ae21ae84983a8ed9418c83cc5f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab69baf9a3cfb4a7be68e3ba250716df5"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__csi__driver.html#gab69baf9a3cfb4a7be68e3ba250716df5">csi_data_bus_t</a> { <a class="el" href="group__csi__driver.html#ggab69baf9a3cfb4a7be68e3ba250716df5ae6e9f2234f6b659241d9d504457e04dd">kCSI_DataBus8Bit</a>
 }</td></tr>
<tr class="memdesc:gab69baf9a3cfb4a7be68e3ba250716df5"><td class="mdescLeft">&#160;</td><td class="mdescRight">CSI data bus witdh.  <a href="group__csi__driver.html#gab69baf9a3cfb4a7be68e3ba250716df5">More...</a><br/></td></tr>
<tr class="separator:gab69baf9a3cfb4a7be68e3ba250716df5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafda41057e6d13039ca0d139b89abde64"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__csi__driver.html#gafda41057e6d13039ca0d139b89abde64">_csi_polarity_flags</a> { <br/>
&#160;&#160;<a class="el" href="group__csi__driver.html#ggafda41057e6d13039ca0d139b89abde64aa1f34086d7ab2823fc0036e30e0b5889">kCSI_HsyncActiveLow</a> = 0U, 
<br/>
&#160;&#160;<a class="el" href="group__csi__driver.html#ggafda41057e6d13039ca0d139b89abde64aab952a4e21500ee629a8bd16ece03b3f">kCSI_HsyncActiveHigh</a> = CSI_CSICR1_HSYNC_POL_MASK, 
<br/>
&#160;&#160;<a class="el" href="group__csi__driver.html#ggafda41057e6d13039ca0d139b89abde64aa98b2058628ba0d2bff537f81df0bfc9">kCSI_DataLatchOnRisingEdge</a> = CSI_CSICR1_REDGE_MASK, 
<br/>
&#160;&#160;<a class="el" href="group__csi__driver.html#ggafda41057e6d13039ca0d139b89abde64a86d385db0cc0163dc5a0a44aad733a80">kCSI_DataLatchOnFallingEdge</a> = 0U
<br/>
 }</td></tr>
<tr class="memdesc:gafda41057e6d13039ca0d139b89abde64"><td class="mdescLeft">&#160;</td><td class="mdescRight">CSI signal polarity.  <a href="group__csi__driver.html#gafda41057e6d13039ca0d139b89abde64">More...</a><br/></td></tr>
<tr class="separator:gafda41057e6d13039ca0d139b89abde64"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf354282828a94ddb23079e6e98399520"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__csi__driver.html#gaf354282828a94ddb23079e6e98399520">csi_fifo_t</a> { <br/>
&#160;&#160;<a class="el" href="group__csi__driver.html#ggaf354282828a94ddb23079e6e98399520a2665957976c094c559d20661126fc914">kCSI_RxFifo</a> = (1U &lt;&lt; 0U), 
<br/>
&#160;&#160;<a class="el" href="group__csi__driver.html#ggaf354282828a94ddb23079e6e98399520a36df4b7466c177205c81d8fd4fe8dfa4">kCSI_StatFifo</a> = (1U &lt;&lt; 1U), 
<br/>
&#160;&#160;<a class="el" href="group__csi__driver.html#ggaf354282828a94ddb23079e6e98399520a960822cab30b37b78e71b03754b1adfc">kCSI_AllFifo</a> = 0x01 | 0x02
<br/>
 }</td></tr>
<tr class="memdesc:gaf354282828a94ddb23079e6e98399520"><td class="mdescLeft">&#160;</td><td class="mdescRight">The CSI FIFO, used for FIFO operation.  <a href="group__csi__driver.html#gaf354282828a94ddb23079e6e98399520">More...</a><br/></td></tr>
<tr class="separator:gaf354282828a94ddb23079e6e98399520"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga445b9c8db2ffe230018ced411b88cc3e"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__csi__driver.html#ga445b9c8db2ffe230018ced411b88cc3e">_csi_interrupt_enable</a> { <br/>
&#160;&#160;<a class="el" href="group__csi__driver.html#gga445b9c8db2ffe230018ced411b88cc3ea7346f16c89a990476f2551ceb7b40065">kCSI_EndOfFrameInterruptEnable</a> = CSI_CSICR1_EOF_INT_EN_MASK, 
<br/>
&#160;&#160;<a class="el" href="group__csi__driver.html#gga445b9c8db2ffe230018ced411b88cc3ead360f344cb258fc94c31091c60a9921c">kCSI_ChangeOfFieldInterruptEnable</a> = CSI_CSICR1_COF_INT_EN_MASK, 
<br/>
&#160;&#160;<a class="el" href="group__csi__driver.html#gga445b9c8db2ffe230018ced411b88cc3ead3eae43cd538d4963a92537e10857375">kCSI_StatFifoOverrunInterruptEnable</a> = CSI_CSICR1_SF_OR_INTEN_MASK, 
<br/>
&#160;&#160;<a class="el" href="group__csi__driver.html#gga445b9c8db2ffe230018ced411b88cc3eabe9ee51fbfa0916ac89d43cf1dceec5a">kCSI_RxFifoOverrunInterruptEnable</a> = CSI_CSICR1_RF_OR_INTEN_MASK, 
<br/>
&#160;&#160;<a class="el" href="group__csi__driver.html#gga445b9c8db2ffe230018ced411b88cc3ea88e9447b7f3d6730a8817418a9149bdf">kCSI_StatFifoDmaDoneInterruptEnable</a>, 
<br/>
&#160;&#160;<a class="el" href="group__csi__driver.html#gga445b9c8db2ffe230018ced411b88cc3ea25e1d2b38d337c7ac800a14ed153496a">kCSI_StatFifoFullInterruptEnable</a> = CSI_CSICR1_STATFF_INTEN_MASK, 
<br/>
&#160;&#160;<a class="el" href="group__csi__driver.html#gga445b9c8db2ffe230018ced411b88cc3eab51980279060e64d99dea0b615b1a6eb">kCSI_RxBuffer1DmaDoneInterruptEnable</a>, 
<br/>
&#160;&#160;<a class="el" href="group__csi__driver.html#gga445b9c8db2ffe230018ced411b88cc3eaa93e6aebf81cc468b6827ecae5e996e3">kCSI_RxBuffer0DmaDoneInterruptEnable</a>, 
<br/>
&#160;&#160;<a class="el" href="group__csi__driver.html#gga445b9c8db2ffe230018ced411b88cc3ea32b521a89db1b0a953e54ff82ddaafe1">kCSI_RxFifoFullInterruptEnable</a> = CSI_CSICR1_RXFF_INTEN_MASK, 
<br/>
&#160;&#160;<a class="el" href="group__csi__driver.html#gga445b9c8db2ffe230018ced411b88cc3ea1f737081cd588e20b0e37adda571380a">kCSI_StartOfFrameInterruptEnable</a> = CSI_CSICR1_SOF_INTEN_MASK, 
<br/>
&#160;&#160;<a class="el" href="group__csi__driver.html#gga445b9c8db2ffe230018ced411b88cc3ea426a30446ecdcd5a8ef11d7114587afc">kCSI_EccErrorInterruptEnable</a> = CSI_CSICR3_ECC_INT_EN_MASK, 
<br/>
&#160;&#160;<a class="el" href="group__csi__driver.html#gga445b9c8db2ffe230018ced411b88cc3eae5a566edbf0dbd027cbd20bc6649fb00">kCSI_AhbResErrorInterruptEnable</a> = CSI_CSICR3_HRESP_ERR_EN_MASK, 
<br/>
&#160;&#160;<a class="el" href="group__csi__driver.html#gga445b9c8db2ffe230018ced411b88cc3ea485b9acd1e879204a29e1351eef0f34b">kCSI_BaseAddrChangeErrorInterruptEnable</a> = CSI_CSICR18_BASEADDR_CHANGE_ERROR_IE_MASK &lt;&lt; 6U, 
<br/>
&#160;&#160;<a class="el" href="group__csi__driver.html#gga445b9c8db2ffe230018ced411b88cc3ea53b2171811b48986f94d99640bc293e6">kCSI_Field0DoneInterruptEnable</a> = CSI_CSICR18_FIELD0_DONE_IE_MASK &lt;&lt; 6U, 
<br/>
&#160;&#160;<a class="el" href="group__csi__driver.html#gga445b9c8db2ffe230018ced411b88cc3ea51b6eae094b905ec5c42f09330ab0cc2">kCSI_Field1DoneInterruptEnable</a> = CSI_CSICR18_DMA_FIELD1_DONE_IE_MASK &lt;&lt; 6U
<br/>
 }</td></tr>
<tr class="memdesc:ga445b9c8db2ffe230018ced411b88cc3e"><td class="mdescLeft">&#160;</td><td class="mdescRight">CSI feature interrupt source.  <a href="group__csi__driver.html#ga445b9c8db2ffe230018ced411b88cc3e">More...</a><br/></td></tr>
<tr class="separator:ga445b9c8db2ffe230018ced411b88cc3e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac962030ce8597d68455e55874a51721f"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__csi__driver.html#gac962030ce8597d68455e55874a51721f">_csi_flags</a> { <br/>
&#160;&#160;<a class="el" href="group__csi__driver.html#ggac962030ce8597d68455e55874a51721fa32acc9a0622596c7f830e6d70568931c">kCSI_RxFifoDataReadyFlag</a> = CSI_CSISR_DRDY_MASK, 
<br/>
&#160;&#160;<a class="el" href="group__csi__driver.html#ggac962030ce8597d68455e55874a51721fa3e02610408a6ebfe221869a1923009ba">kCSI_EccErrorFlag</a> = CSI_CSISR_ECC_INT_MASK, 
<br/>
&#160;&#160;<a class="el" href="group__csi__driver.html#ggac962030ce8597d68455e55874a51721fa984df7af7f9825fb4659d11f42463f44">kCSI_AhbResErrorFlag</a> = CSI_CSISR_HRESP_ERR_INT_MASK, 
<br/>
&#160;&#160;<a class="el" href="group__csi__driver.html#ggac962030ce8597d68455e55874a51721fabe92f518f5c2f0ccbe55ebdcf4c29e89">kCSI_ChangeOfFieldFlag</a> = CSI_CSISR_COF_INT_MASK, 
<br/>
&#160;&#160;<a class="el" href="group__csi__driver.html#ggac962030ce8597d68455e55874a51721fab337940c172c17058f8cde8bb676378f">kCSI_Field0PresentFlag</a> = CSI_CSISR_F1_INT_MASK, 
<br/>
&#160;&#160;<a class="el" href="group__csi__driver.html#ggac962030ce8597d68455e55874a51721fa157a47bde1ba661fdf22ca2ae61b3c0b">kCSI_Field1PresentFlag</a> = CSI_CSISR_F2_INT_MASK, 
<br/>
&#160;&#160;<a class="el" href="group__csi__driver.html#ggac962030ce8597d68455e55874a51721fa064c85b25c414abdeb86d501eb57360c">kCSI_StartOfFrameFlag</a> = CSI_CSISR_SOF_INT_MASK, 
<br/>
&#160;&#160;<a class="el" href="group__csi__driver.html#ggac962030ce8597d68455e55874a51721fac6409ca23ef24a10e22fb9582213f2bc">kCSI_EndOfFrameFlag</a> = CSI_CSISR_EOF_INT_MASK, 
<br/>
&#160;&#160;<a class="el" href="group__csi__driver.html#ggac962030ce8597d68455e55874a51721fabdd835d96491b90bf5ae39dc5e4b0497">kCSI_RxFifoFullFlag</a> = CSI_CSISR_RxFF_INT_MASK, 
<br/>
&#160;&#160;<a class="el" href="group__csi__driver.html#ggac962030ce8597d68455e55874a51721fa27f18871d1b522ca628722a3fb80b89d">kCSI_RxBuffer1DmaDoneFlag</a> = CSI_CSISR_DMA_TSF_DONE_FB2_MASK, 
<br/>
&#160;&#160;<a class="el" href="group__csi__driver.html#ggac962030ce8597d68455e55874a51721fa3168d94660e46e761c0639a1a20b74ee">kCSI_RxBuffer0DmaDoneFlag</a> = CSI_CSISR_DMA_TSF_DONE_FB1_MASK, 
<br/>
&#160;&#160;<a class="el" href="group__csi__driver.html#ggac962030ce8597d68455e55874a51721fa920018020044eb07e3ffed1f423208a5">kCSI_StatFifoFullFlag</a> = CSI_CSISR_STATFF_INT_MASK, 
<br/>
&#160;&#160;<a class="el" href="group__csi__driver.html#ggac962030ce8597d68455e55874a51721fa961784728b693f7741adb7b17ebe425b">kCSI_StatFifoDmaDoneFlag</a> = CSI_CSISR_DMA_TSF_DONE_SFF_MASK, 
<br/>
&#160;&#160;<a class="el" href="group__csi__driver.html#ggac962030ce8597d68455e55874a51721fa0350ec81b55a8180eaffcd8b1f537cdf">kCSI_StatFifoOverrunFlag</a> = CSI_CSISR_SF_OR_INT_MASK, 
<br/>
&#160;&#160;<a class="el" href="group__csi__driver.html#ggac962030ce8597d68455e55874a51721fab01731bc864c9b47644a6de2bc2f88d5">kCSI_RxFifoOverrunFlag</a> = CSI_CSISR_RF_OR_INT_MASK, 
<br/>
&#160;&#160;<a class="el" href="group__csi__driver.html#ggac962030ce8597d68455e55874a51721fa2676d308e2677cc91f47ae0661355d10">kCSI_Field0DoneFlag</a> = CSI_CSISR_DMA_FIELD0_DONE_MASK, 
<br/>
&#160;&#160;<a class="el" href="group__csi__driver.html#ggac962030ce8597d68455e55874a51721fa6e7f6d415b0e9848c2f33f25ea9c0036">kCSI_Field1DoneFlag</a> = CSI_CSISR_DMA_FIELD1_DONE_MASK, 
<br/>
&#160;&#160;<a class="el" href="group__csi__driver.html#ggac962030ce8597d68455e55874a51721fa254be4a91697e3bf3146a663454c2e60">kCSI_BaseAddrChangeErrorFlag</a> = CSI_CSISR_BASEADDR_CHHANGE_ERROR_MASK
<br/>
 }</td></tr>
<tr class="memdesc:gac962030ce8597d68455e55874a51721f"><td class="mdescLeft">&#160;</td><td class="mdescRight">CSI status flags.  <a href="group__csi__driver.html#gac962030ce8597d68455e55874a51721f">More...</a><br/></td></tr>
<tr class="separator:gac962030ce8597d68455e55874a51721f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
Driver version</h2></td></tr>
<tr class="memitem:ga763b9b92933249b8711f9a61b98efe58"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga763b9b92933249b8711f9a61b98efe58"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>FSL_CSI_DRIVER_VERSION</b>&#160;&#160;&#160;(MAKE_VERSION(2, 0, 0))</td></tr>
<tr class="separator:ga763b9b92933249b8711f9a61b98efe58"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
Initialization and deinitialization</h2></td></tr>
<tr class="memitem:ga6ab1581b894e0addd36e259454d894fb"><td class="memItemLeft" align="right" valign="top">status_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__csi__driver.html#ga6ab1581b894e0addd36e259454d894fb">CSI_Init</a> (CSI_Type *base, const <a class="el" href="group__csi__driver.html#structcsi__config__t">csi_config_t</a> *config)</td></tr>
<tr class="memdesc:ga6ab1581b894e0addd36e259454d894fb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize the CSI.  <a href="#ga6ab1581b894e0addd36e259454d894fb">More...</a><br/></td></tr>
<tr class="separator:ga6ab1581b894e0addd36e259454d894fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga29130aa6333127427e9945203a941c31"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__csi__driver.html#ga29130aa6333127427e9945203a941c31">CSI_Deinit</a> (CSI_Type *base)</td></tr>
<tr class="memdesc:ga29130aa6333127427e9945203a941c31"><td class="mdescLeft">&#160;</td><td class="mdescRight">De-initialize the CSI.  <a href="#ga29130aa6333127427e9945203a941c31">More...</a><br/></td></tr>
<tr class="separator:ga29130aa6333127427e9945203a941c31"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaaf0c3b036356a13b113c190762035317"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__csi__driver.html#gaaf0c3b036356a13b113c190762035317">CSI_Reset</a> (CSI_Type *base)</td></tr>
<tr class="memdesc:gaaf0c3b036356a13b113c190762035317"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reset the CSI.  <a href="#gaaf0c3b036356a13b113c190762035317">More...</a><br/></td></tr>
<tr class="separator:gaaf0c3b036356a13b113c190762035317"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga44bd4343d5866367abc152651f3d8a03"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__csi__driver.html#ga44bd4343d5866367abc152651f3d8a03">CSI_GetDefaultConfig</a> (<a class="el" href="group__csi__driver.html#structcsi__config__t">csi_config_t</a> *config)</td></tr>
<tr class="memdesc:ga44bd4343d5866367abc152651f3d8a03"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the default configuration for to initialize the CSI.  <a href="#ga44bd4343d5866367abc152651f3d8a03">More...</a><br/></td></tr>
<tr class="separator:ga44bd4343d5866367abc152651f3d8a03"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
Module operation</h2></td></tr>
<tr class="memitem:gaa9a972883f2e04aefb94bac426fa9c72"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__csi__driver.html#gaa9a972883f2e04aefb94bac426fa9c72">CSI_ClearFifo</a> (CSI_Type *base, <a class="el" href="group__csi__driver.html#gaf354282828a94ddb23079e6e98399520">csi_fifo_t</a> fifo)</td></tr>
<tr class="memdesc:gaa9a972883f2e04aefb94bac426fa9c72"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clear the CSI FIFO.  <a href="#gaa9a972883f2e04aefb94bac426fa9c72">More...</a><br/></td></tr>
<tr class="separator:gaa9a972883f2e04aefb94bac426fa9c72"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabd61e583724350ad66feacf6cb55e86c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__csi__driver.html#gabd61e583724350ad66feacf6cb55e86c">CSI_ReflashFifoDma</a> (CSI_Type *base, <a class="el" href="group__csi__driver.html#gaf354282828a94ddb23079e6e98399520">csi_fifo_t</a> fifo)</td></tr>
<tr class="memdesc:gabd61e583724350ad66feacf6cb55e86c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reflash the CSI FIFO DMA.  <a href="#gabd61e583724350ad66feacf6cb55e86c">More...</a><br/></td></tr>
<tr class="separator:gabd61e583724350ad66feacf6cb55e86c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga266530ad9e8aa0e0e4977317b5cd9899"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__csi__driver.html#ga266530ad9e8aa0e0e4977317b5cd9899">CSI_EnableFifoDmaRequest</a> (CSI_Type *base, <a class="el" href="group__csi__driver.html#gaf354282828a94ddb23079e6e98399520">csi_fifo_t</a> fifo, bool enable)</td></tr>
<tr class="memdesc:ga266530ad9e8aa0e0e4977317b5cd9899"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable or disable the CSI FIFO DMA request.  <a href="#ga266530ad9e8aa0e0e4977317b5cd9899">More...</a><br/></td></tr>
<tr class="separator:ga266530ad9e8aa0e0e4977317b5cd9899"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gace757ddd954a29a1a11c0bdc119b17ad"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__csi__driver.html#gace757ddd954a29a1a11c0bdc119b17ad">CSI_Start</a> (CSI_Type *base)</td></tr>
<tr class="memdesc:gace757ddd954a29a1a11c0bdc119b17ad"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start to receive data.  <a href="#gace757ddd954a29a1a11c0bdc119b17ad">More...</a><br/></td></tr>
<tr class="separator:gace757ddd954a29a1a11c0bdc119b17ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga49731f4255e64f48eb0f26628296c13e"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__csi__driver.html#ga49731f4255e64f48eb0f26628296c13e">CSI_Stop</a> (CSI_Type *base)</td></tr>
<tr class="memdesc:ga49731f4255e64f48eb0f26628296c13e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stop to receiving data.  <a href="#ga49731f4255e64f48eb0f26628296c13e">More...</a><br/></td></tr>
<tr class="separator:ga49731f4255e64f48eb0f26628296c13e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga17f23deb7d61ad8d88b10165e512d50d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__csi__driver.html#ga17f23deb7d61ad8d88b10165e512d50d">CSI_SetRxBufferAddr</a> (CSI_Type *base, uint8_t index, uint32_t addr)</td></tr>
<tr class="memdesc:ga17f23deb7d61ad8d88b10165e512d50d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the RX frame buffer address.  <a href="#ga17f23deb7d61ad8d88b10165e512d50d">More...</a><br/></td></tr>
<tr class="separator:ga17f23deb7d61ad8d88b10165e512d50d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
Interrupts</h2></td></tr>
<tr class="memitem:ga433cf3d4d36b2d602b2e41b415abd85f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__csi__driver.html#ga433cf3d4d36b2d602b2e41b415abd85f">CSI_EnableInterrupts</a> (CSI_Type *base, uint32_t mask)</td></tr>
<tr class="memdesc:ga433cf3d4d36b2d602b2e41b415abd85f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enables CSI interrupt requests.  <a href="#ga433cf3d4d36b2d602b2e41b415abd85f">More...</a><br/></td></tr>
<tr class="separator:ga433cf3d4d36b2d602b2e41b415abd85f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaaef95a89e63407cdb28b9dbf81ce4fe5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__csi__driver.html#gaaef95a89e63407cdb28b9dbf81ce4fe5">CSI_DisableInterrupts</a> (CSI_Type *base, uint32_t mask)</td></tr>
<tr class="memdesc:gaaef95a89e63407cdb28b9dbf81ce4fe5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disable CSI interrupt requests.  <a href="#gaaef95a89e63407cdb28b9dbf81ce4fe5">More...</a><br/></td></tr>
<tr class="separator:gaaef95a89e63407cdb28b9dbf81ce4fe5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
Status</h2></td></tr>
<tr class="memitem:gac756a072ac5afdb9567632d02d13e73f"><td class="memItemLeft" align="right" valign="top">static uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__csi__driver.html#gac756a072ac5afdb9567632d02d13e73f">CSI_GetStatusFlags</a> (CSI_Type *base)</td></tr>
<tr class="memdesc:gac756a072ac5afdb9567632d02d13e73f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the CSI status flags.  <a href="#gac756a072ac5afdb9567632d02d13e73f">More...</a><br/></td></tr>
<tr class="separator:gac756a072ac5afdb9567632d02d13e73f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9368862568891bbdb29b0a6287801506"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__csi__driver.html#ga9368862568891bbdb29b0a6287801506">CSI_ClearStatusFlags</a> (CSI_Type *base, uint32_t statusMask)</td></tr>
<tr class="memdesc:ga9368862568891bbdb29b0a6287801506"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clears the CSI status flag.  <a href="#ga9368862568891bbdb29b0a6287801506">More...</a><br/></td></tr>
<tr class="separator:ga9368862568891bbdb29b0a6287801506"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
Transactional</h2></td></tr>
<tr class="memitem:gaff15e4c1cd458f686e4f296ce3d417d5"><td class="memItemLeft" align="right" valign="top">status_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__csi__driver.html#gaff15e4c1cd458f686e4f296ce3d417d5">CSI_TransferCreateHandle</a> (CSI_Type *base, csi_handle_t *handle, <a class="el" href="group__csi__driver.html#ga68a7e9c86a91b7ffb6547cf762ef6f3f">csi_transfer_callback_t</a> callback, void *userData)</td></tr>
<tr class="memdesc:gaff15e4c1cd458f686e4f296ce3d417d5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes the CSI handle.  <a href="#gaff15e4c1cd458f686e4f296ce3d417d5">More...</a><br/></td></tr>
<tr class="separator:gaff15e4c1cd458f686e4f296ce3d417d5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga65a17c86c64297a09857e435588a65d6"><td class="memItemLeft" align="right" valign="top">status_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__csi__driver.html#ga65a17c86c64297a09857e435588a65d6">CSI_TransferStart</a> (CSI_Type *base, csi_handle_t *handle)</td></tr>
<tr class="memdesc:ga65a17c86c64297a09857e435588a65d6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start the transfer using transactional functions.  <a href="#ga65a17c86c64297a09857e435588a65d6">More...</a><br/></td></tr>
<tr class="separator:ga65a17c86c64297a09857e435588a65d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac20498234465760225985287ff862751"><td class="memItemLeft" align="right" valign="top">status_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__csi__driver.html#gac20498234465760225985287ff862751">CSI_TransferStop</a> (CSI_Type *base, csi_handle_t *handle)</td></tr>
<tr class="memdesc:gac20498234465760225985287ff862751"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stop the transfer using transactional functions.  <a href="#gac20498234465760225985287ff862751">More...</a><br/></td></tr>
<tr class="separator:gac20498234465760225985287ff862751"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga807a6677a22856cf8ad1e37253b14d44"><td class="memItemLeft" align="right" valign="top">status_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__csi__driver.html#ga807a6677a22856cf8ad1e37253b14d44">CSI_TransferSubmitEmptyBuffer</a> (CSI_Type *base, csi_handle_t *handle, uint32_t frameBuffer)</td></tr>
<tr class="memdesc:ga807a6677a22856cf8ad1e37253b14d44"><td class="mdescLeft">&#160;</td><td class="mdescRight">Submit empty frame buffer to queue.  <a href="#ga807a6677a22856cf8ad1e37253b14d44">More...</a><br/></td></tr>
<tr class="separator:ga807a6677a22856cf8ad1e37253b14d44"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga36f7bf646f55c098fb12d6fa387d6424"><td class="memItemLeft" align="right" valign="top">status_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__csi__driver.html#ga36f7bf646f55c098fb12d6fa387d6424">CSI_TransferGetFullBuffer</a> (CSI_Type *base, csi_handle_t *handle, uint32_t *frameBuffer)</td></tr>
<tr class="memdesc:ga36f7bf646f55c098fb12d6fa387d6424"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get one full frame buffer from queue.  <a href="#ga36f7bf646f55c098fb12d6fa387d6424">More...</a><br/></td></tr>
<tr class="separator:ga36f7bf646f55c098fb12d6fa387d6424"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa8118210b401dacd2257dbb75c6a6310"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__csi__driver.html#gaa8118210b401dacd2257dbb75c6a6310">CSI_TransferHandleIRQ</a> (CSI_Type *base, csi_handle_t *handle)</td></tr>
<tr class="memdesc:gaa8118210b401dacd2257dbb75c6a6310"><td class="mdescLeft">&#160;</td><td class="mdescRight">CSI IRQ handle function.  <a href="#gaa8118210b401dacd2257dbb75c6a6310">More...</a><br/></td></tr>
<tr class="separator:gaa8118210b401dacd2257dbb75c6a6310"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<hr/><h2 class="groupheader">Data Structure Documentation</h2>
<a name="structcsi__config__t" id="structcsi__config__t"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct csi_config_t</td>
        </tr>
      </table>
</div><div class="memdoc">
<div class="textblock"></div><table class="memberdecls">
<tr><td colspan="2"><h3>Data Fields</h3></td></tr>
<tr class="memitem:ac5d64ed31de712862131d8ba0c0acada"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__csi__driver.html#ac5d64ed31de712862131d8ba0c0acada">width</a></td></tr>
<tr class="memdesc:ac5d64ed31de712862131d8ba0c0acada"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pixels of the input frame.  <a href="#ac5d64ed31de712862131d8ba0c0acada">More...</a><br/></td></tr>
<tr class="separator:ac5d64ed31de712862131d8ba0c0acada"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af353234bdd91adf25b2bfa24cec0288e"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__csi__driver.html#af353234bdd91adf25b2bfa24cec0288e">height</a></td></tr>
<tr class="memdesc:af353234bdd91adf25b2bfa24cec0288e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Lines of the input frame.  <a href="#af353234bdd91adf25b2bfa24cec0288e">More...</a><br/></td></tr>
<tr class="separator:af353234bdd91adf25b2bfa24cec0288e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5715e589bee1f54aac85ab996a59f204"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__csi__driver.html#a5715e589bee1f54aac85ab996a59f204">polarityFlags</a></td></tr>
<tr class="memdesc:a5715e589bee1f54aac85ab996a59f204"><td class="mdescLeft">&#160;</td><td class="mdescRight">Timing signal polarity flags, OR'ed value of <a class="el" href="group__csi__driver.html#gafda41057e6d13039ca0d139b89abde64">_csi_polarity_flags</a>.  <a href="#a5715e589bee1f54aac85ab996a59f204">More...</a><br/></td></tr>
<tr class="separator:a5715e589bee1f54aac85ab996a59f204"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae55dcf6dcbf3635432320d5a81ff9c4b"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__csi__driver.html#ae55dcf6dcbf3635432320d5a81ff9c4b">bytesPerPixel</a></td></tr>
<tr class="memdesc:ae55dcf6dcbf3635432320d5a81ff9c4b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bytes per pixel, valid values are:  <a href="#ae55dcf6dcbf3635432320d5a81ff9c4b">More...</a><br/></td></tr>
<tr class="separator:ae55dcf6dcbf3635432320d5a81ff9c4b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae1642a6be28003bcb2642e6931cc75dd"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__csi__driver.html#ae1642a6be28003bcb2642e6931cc75dd">linePitch_Bytes</a></td></tr>
<tr class="memdesc:ae1642a6be28003bcb2642e6931cc75dd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Frame buffer line pitch, must be 8-byte aligned.  <a href="#ae1642a6be28003bcb2642e6931cc75dd">More...</a><br/></td></tr>
<tr class="separator:ae1642a6be28003bcb2642e6931cc75dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a13aec4d48580eed8cd9ea6ee9952b408"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__csi__driver.html#ga5539d9ae21ae84983a8ed9418c83cc5f">csi_work_mode_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__csi__driver.html#a13aec4d48580eed8cd9ea6ee9952b408">workMode</a></td></tr>
<tr class="memdesc:a13aec4d48580eed8cd9ea6ee9952b408"><td class="mdescLeft">&#160;</td><td class="mdescRight">CSI work mode.  <a href="#a13aec4d48580eed8cd9ea6ee9952b408">More...</a><br/></td></tr>
<tr class="separator:a13aec4d48580eed8cd9ea6ee9952b408"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0c7630ee5ca46f6cf1a23a83378bdb1f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__csi__driver.html#gab69baf9a3cfb4a7be68e3ba250716df5">csi_data_bus_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__csi__driver.html#a0c7630ee5ca46f6cf1a23a83378bdb1f">dataBus</a></td></tr>
<tr class="memdesc:a0c7630ee5ca46f6cf1a23a83378bdb1f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Data bus width.  <a href="#a0c7630ee5ca46f6cf1a23a83378bdb1f">More...</a><br/></td></tr>
<tr class="separator:a0c7630ee5ca46f6cf1a23a83378bdb1f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a436dcb1c1ed0cd25910b9df57267bd02"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__csi__driver.html#a436dcb1c1ed0cd25910b9df57267bd02">useExtVsync</a></td></tr>
<tr class="memdesc:a436dcb1c1ed0cd25910b9df57267bd02"><td class="mdescLeft">&#160;</td><td class="mdescRight">In CCIR656 progressive mode, set true to use external VSYNC signal, set false to use internal VSYNC signal decoded from SOF.  <a href="#a436dcb1c1ed0cd25910b9df57267bd02">More...</a><br/></td></tr>
<tr class="separator:a436dcb1c1ed0cd25910b9df57267bd02"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h4 class="groupheader">Field Documentation</h4>
<a class="anchor" id="ac5d64ed31de712862131d8ba0c0acada"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint16_t csi_config_t::width</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="af353234bdd91adf25b2bfa24cec0288e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint16_t csi_config_t::height</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a5715e589bee1f54aac85ab996a59f204"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t csi_config_t::polarityFlags</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="ae55dcf6dcbf3635432320d5a81ff9c4b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t csi_config_t::bytesPerPixel</td>
        </tr>
      </table>
</div><div class="memdoc">
<ul>
<li>2: Used for RGB565, YUV422, and so on.</li>
<li>3: Used for packed RGB888, packed YUV444, and so on.</li>
<li>4: Used for XRGB8888, XYUV444, and so on. </li>
</ul>

</div>
</div>
<a class="anchor" id="ae1642a6be28003bcb2642e6931cc75dd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint16_t csi_config_t::linePitch_Bytes</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a13aec4d48580eed8cd9ea6ee9952b408"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__csi__driver.html#ga5539d9ae21ae84983a8ed9418c83cc5f">csi_work_mode_t</a> csi_config_t::workMode</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a0c7630ee5ca46f6cf1a23a83378bdb1f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__csi__driver.html#gab69baf9a3cfb4a7be68e3ba250716df5">csi_data_bus_t</a> csi_config_t::dataBus</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a436dcb1c1ed0cd25910b9df57267bd02"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool csi_config_t::useExtVsync</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>

</div>
</div>
<a name="struct__csi__handle" id="struct__csi__handle"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">struct _csi_handle</td>
        </tr>
      </table>
</div><div class="memdoc">
<div class="textblock"><p>Please see the user guide for the details of the CSI driver queue mechanism. </p>
</div><table class="memberdecls">
<tr><td colspan="2"><h3>Data Fields</h3></td></tr>
<tr class="memitem:aa1a9c395647713b07bc92e4b89a9a547"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__csi__driver.html#aa1a9c395647713b07bc92e4b89a9a547">frameBufferQueue</a> [CSI_DRIVER_ACTUAL_QUEUE_SIZE]</td></tr>
<tr class="memdesc:aa1a9c395647713b07bc92e4b89a9a547"><td class="mdescLeft">&#160;</td><td class="mdescRight">Frame buffer queue.  <a href="#aa1a9c395647713b07bc92e4b89a9a547">More...</a><br/></td></tr>
<tr class="separator:aa1a9c395647713b07bc92e4b89a9a547"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0fc337975f45e875ef32f68bbccca7ae"><td class="memItemLeft" align="right" valign="top">volatile uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__csi__driver.html#a0fc337975f45e875ef32f68bbccca7ae">queueUserReadIdx</a></td></tr>
<tr class="memdesc:a0fc337975f45e875ef32f68bbccca7ae"><td class="mdescLeft">&#160;</td><td class="mdescRight">Application gets full-filled frame buffer from this index.  <a href="#a0fc337975f45e875ef32f68bbccca7ae">More...</a><br/></td></tr>
<tr class="separator:a0fc337975f45e875ef32f68bbccca7ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aabfdab5f4a64cabc61be03fbf46ba8ab"><td class="memItemLeft" align="right" valign="top">volatile uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__csi__driver.html#aabfdab5f4a64cabc61be03fbf46ba8ab">queueUserWriteIdx</a></td></tr>
<tr class="memdesc:aabfdab5f4a64cabc61be03fbf46ba8ab"><td class="mdescLeft">&#160;</td><td class="mdescRight">Application puts empty frame buffer to this index.  <a href="#aabfdab5f4a64cabc61be03fbf46ba8ab">More...</a><br/></td></tr>
<tr class="separator:aabfdab5f4a64cabc61be03fbf46ba8ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3a271bc20536bff32e0c43927dc7a58c"><td class="memItemLeft" align="right" valign="top">volatile uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__csi__driver.html#a3a271bc20536bff32e0c43927dc7a58c">queueDrvReadIdx</a></td></tr>
<tr class="memdesc:a3a271bc20536bff32e0c43927dc7a58c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Driver gets empty frame buffer from this index.  <a href="#a3a271bc20536bff32e0c43927dc7a58c">More...</a><br/></td></tr>
<tr class="separator:a3a271bc20536bff32e0c43927dc7a58c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad95f4fd0015ee389cb84b38c686d1496"><td class="memItemLeft" align="right" valign="top">volatile uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__csi__driver.html#ad95f4fd0015ee389cb84b38c686d1496">queueDrvWriteIdx</a></td></tr>
<tr class="memdesc:ad95f4fd0015ee389cb84b38c686d1496"><td class="mdescLeft">&#160;</td><td class="mdescRight">Driver puts the full-filled frame buffer to this index.  <a href="#ad95f4fd0015ee389cb84b38c686d1496">More...</a><br/></td></tr>
<tr class="separator:ad95f4fd0015ee389cb84b38c686d1496"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab7f697fa8fe1046abab800cb46b66137"><td class="memItemLeft" align="right" valign="top">volatile uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__csi__driver.html#ab7f697fa8fe1046abab800cb46b66137">activeBufferNum</a></td></tr>
<tr class="memdesc:ab7f697fa8fe1046abab800cb46b66137"><td class="mdescLeft">&#160;</td><td class="mdescRight">How many frame buffers are in progres currently.  <a href="#ab7f697fa8fe1046abab800cb46b66137">More...</a><br/></td></tr>
<tr class="separator:ab7f697fa8fe1046abab800cb46b66137"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a11684a59fa062d5cc1abdfdc57542aaa"><td class="memItemLeft" align="right" valign="top">volatile uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__csi__driver.html#a11684a59fa062d5cc1abdfdc57542aaa">nextBufferIdx</a></td></tr>
<tr class="memdesc:a11684a59fa062d5cc1abdfdc57542aaa"><td class="mdescLeft">&#160;</td><td class="mdescRight">The CSI frame buffer index to use for next frame.  <a href="#a11684a59fa062d5cc1abdfdc57542aaa">More...</a><br/></td></tr>
<tr class="separator:a11684a59fa062d5cc1abdfdc57542aaa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2a6ce7912da50c9dcfb863e2f86cfff3"><td class="memItemLeft" align="right" valign="top">volatile bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__csi__driver.html#a2a6ce7912da50c9dcfb863e2f86cfff3">transferStarted</a></td></tr>
<tr class="memdesc:a2a6ce7912da50c9dcfb863e2f86cfff3"><td class="mdescLeft">&#160;</td><td class="mdescRight">User has called <a class="el" href="group__csi__driver.html#ga65a17c86c64297a09857e435588a65d6">CSI_TransferStart</a> to start frame receiving.  <a href="#a2a6ce7912da50c9dcfb863e2f86cfff3">More...</a><br/></td></tr>
<tr class="separator:a2a6ce7912da50c9dcfb863e2f86cfff3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a97a365cac2ab93fe9b978f34cedcaa08"><td class="memItemLeft" align="right" valign="top">volatile bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__csi__driver.html#a97a365cac2ab93fe9b978f34cedcaa08">transferOnGoing</a></td></tr>
<tr class="memdesc:a97a365cac2ab93fe9b978f34cedcaa08"><td class="mdescLeft">&#160;</td><td class="mdescRight">CSI is working and receiving incoming frames.  <a href="#a97a365cac2ab93fe9b978f34cedcaa08">More...</a><br/></td></tr>
<tr class="separator:a97a365cac2ab93fe9b978f34cedcaa08"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a902b1fc7c58b91d0c4c41fc271c06a3c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__csi__driver.html#ga68a7e9c86a91b7ffb6547cf762ef6f3f">csi_transfer_callback_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__csi__driver.html#a902b1fc7c58b91d0c4c41fc271c06a3c">callback</a></td></tr>
<tr class="memdesc:a902b1fc7c58b91d0c4c41fc271c06a3c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback function.  <a href="#a902b1fc7c58b91d0c4c41fc271c06a3c">More...</a><br/></td></tr>
<tr class="separator:a902b1fc7c58b91d0c4c41fc271c06a3c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6b8b45ae015b412d2a9bb94925ff844f"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__csi__driver.html#a6b8b45ae015b412d2a9bb94925ff844f">userData</a></td></tr>
<tr class="memdesc:a6b8b45ae015b412d2a9bb94925ff844f"><td class="mdescLeft">&#160;</td><td class="mdescRight">CSI callback function parameter.  <a href="#a6b8b45ae015b412d2a9bb94925ff844f">More...</a><br/></td></tr>
<tr class="separator:a6b8b45ae015b412d2a9bb94925ff844f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h4 class="groupheader">Field Documentation</h4>
<a class="anchor" id="aa1a9c395647713b07bc92e4b89a9a547"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t csi_handle_t::frameBufferQueue[CSI_DRIVER_ACTUAL_QUEUE_SIZE]</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a0fc337975f45e875ef32f68bbccca7ae"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">volatile uint8_t csi_handle_t::queueUserReadIdx</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="aabfdab5f4a64cabc61be03fbf46ba8ab"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">volatile uint8_t csi_handle_t::queueUserWriteIdx</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a3a271bc20536bff32e0c43927dc7a58c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">volatile uint8_t csi_handle_t::queueDrvReadIdx</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="ad95f4fd0015ee389cb84b38c686d1496"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">volatile uint8_t csi_handle_t::queueDrvWriteIdx</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="ab7f697fa8fe1046abab800cb46b66137"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">volatile uint8_t csi_handle_t::activeBufferNum</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a11684a59fa062d5cc1abdfdc57542aaa"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">volatile uint8_t csi_handle_t::nextBufferIdx</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a2a6ce7912da50c9dcfb863e2f86cfff3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">volatile bool csi_handle_t::transferStarted</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a97a365cac2ab93fe9b978f34cedcaa08"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">volatile bool csi_handle_t::transferOnGoing</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a902b1fc7c58b91d0c4c41fc271c06a3c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__csi__driver.html#ga68a7e9c86a91b7ffb6547cf762ef6f3f">csi_transfer_callback_t</a> csi_handle_t::callback</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a6b8b45ae015b412d2a9bb94925ff844f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* csi_handle_t::userData</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>

</div>
</div>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="ga6f3f169f7ba5517e946634a28add89e1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CSI_DRIVER_QUEUE_SIZE&#160;&#160;&#160;4U</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Typedef Documentation</h2>
<a class="anchor" id="ga68a7e9c86a91b7ffb6547cf762ef6f3f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void(* csi_transfer_callback_t)(CSI_Type *base, csi_handle_t *handle, status_t status, void *userData)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>When a new frame is received and saved to the frame buffer queue, the callback is called and the pass the status <a class="el" href="group__csi__driver.html#ggae4f8083589858f5dbdd0046f5bdd4f97ac9a47e7b267d5ece60e04306d2e245d2">kStatus_CSI_FrameDone</a> to upper layer. </p>

</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a class="anchor" id="gae4f8083589858f5dbdd0046f5bdd4f97"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__csi__driver.html#gae4f8083589858f5dbdd0046f5bdd4f97">_csi_status</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="ggae4f8083589858f5dbdd0046f5bdd4f97a14ddc6ba82ee752fdfe1f4b0e64d5533"></a>kStatus_CSI_NoEmptyBuffer</em>&nbsp;</td><td class="fielddoc">
<p>No empty frame buffer in queue to load to CSI. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggae4f8083589858f5dbdd0046f5bdd4f97a4fb022ca8ae559e96d18524e7ea09a5f"></a>kStatus_CSI_NoFullBuffer</em>&nbsp;</td><td class="fielddoc">
<p>No full frame buffer in queue to read out. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggae4f8083589858f5dbdd0046f5bdd4f97a6517cec370f757b84ba21eb690e51635"></a>kStatus_CSI_QueueFull</em>&nbsp;</td><td class="fielddoc">
<p>Queue is full, no room to save new empty buffer. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggae4f8083589858f5dbdd0046f5bdd4f97ac9a47e7b267d5ece60e04306d2e245d2"></a>kStatus_CSI_FrameDone</em>&nbsp;</td><td class="fielddoc">
<p>New frame received and saved to queue. </p>
</td></tr>
</table>

</div>
</div>
<a class="anchor" id="ga5539d9ae21ae84983a8ed9418c83cc5f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__csi__driver.html#ga5539d9ae21ae84983a8ed9418c83cc5f">csi_work_mode_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The CCIR656 interlace mode is not supported currently. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="gga5539d9ae21ae84983a8ed9418c83cc5fab707b88b2c5b3ca70afe6b78f2988571"></a>kCSI_GatedClockMode</em>&nbsp;</td><td class="fielddoc">
<p>HSYNC, VSYNC, and PIXCLK signals are used. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga5539d9ae21ae84983a8ed9418c83cc5faefff73d6d0ed48e20bb12df629036633"></a>kCSI_NonGatedClockMode</em>&nbsp;</td><td class="fielddoc">
<p>VSYNC, and PIXCLK signals are used. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga5539d9ae21ae84983a8ed9418c83cc5fabab5a5dfbcc1c77bc66513760fdb0ddf"></a>kCSI_CCIR656ProgressiveMode</em>&nbsp;</td><td class="fielddoc">
<p>CCIR656 progressive mode. </p>
</td></tr>
</table>

</div>
</div>
<a class="anchor" id="gab69baf9a3cfb4a7be68e3ba250716df5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__csi__driver.html#gab69baf9a3cfb4a7be68e3ba250716df5">csi_data_bus_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Currently only support 8-bit width. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="ggab69baf9a3cfb4a7be68e3ba250716df5ae6e9f2234f6b659241d9d504457e04dd"></a>kCSI_DataBus8Bit</em>&nbsp;</td><td class="fielddoc">
<p>8-bit data bus. </p>
</td></tr>
</table>

</div>
</div>
<a class="anchor" id="gafda41057e6d13039ca0d139b89abde64"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__csi__driver.html#gafda41057e6d13039ca0d139b89abde64">_csi_polarity_flags</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="ggafda41057e6d13039ca0d139b89abde64aa1f34086d7ab2823fc0036e30e0b5889"></a>kCSI_HsyncActiveLow</em>&nbsp;</td><td class="fielddoc">
<p>HSYNC is active low. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggafda41057e6d13039ca0d139b89abde64aab952a4e21500ee629a8bd16ece03b3f"></a>kCSI_HsyncActiveHigh</em>&nbsp;</td><td class="fielddoc">
<p>HSYNC is active high. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggafda41057e6d13039ca0d139b89abde64aa98b2058628ba0d2bff537f81df0bfc9"></a>kCSI_DataLatchOnRisingEdge</em>&nbsp;</td><td class="fielddoc">
<p>Pixel data latched at rising edge of pixel clock. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggafda41057e6d13039ca0d139b89abde64a86d385db0cc0163dc5a0a44aad733a80"></a>kCSI_DataLatchOnFallingEdge</em>&nbsp;</td><td class="fielddoc">
<p>Pixel data latched at falling edge of pixel clock. </p>
</td></tr>
</table>

</div>
</div>
<a class="anchor" id="gaf354282828a94ddb23079e6e98399520"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__csi__driver.html#gaf354282828a94ddb23079e6e98399520">csi_fifo_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="ggaf354282828a94ddb23079e6e98399520a2665957976c094c559d20661126fc914"></a>kCSI_RxFifo</em>&nbsp;</td><td class="fielddoc">
<p>RXFIFO. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggaf354282828a94ddb23079e6e98399520a36df4b7466c177205c81d8fd4fe8dfa4"></a>kCSI_StatFifo</em>&nbsp;</td><td class="fielddoc">
<p>STAT FIFO. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggaf354282828a94ddb23079e6e98399520a960822cab30b37b78e71b03754b1adfc"></a>kCSI_AllFifo</em>&nbsp;</td><td class="fielddoc">
<p>Both RXFIFO and STAT FIFO. </p>
</td></tr>
</table>

</div>
</div>
<a class="anchor" id="ga445b9c8db2ffe230018ced411b88cc3e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__csi__driver.html#ga445b9c8db2ffe230018ced411b88cc3e">_csi_interrupt_enable</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="gga445b9c8db2ffe230018ced411b88cc3ea7346f16c89a990476f2551ceb7b40065"></a>kCSI_EndOfFrameInterruptEnable</em>&nbsp;</td><td class="fielddoc">
<p>End of frame interrupt enable. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga445b9c8db2ffe230018ced411b88cc3ead360f344cb258fc94c31091c60a9921c"></a>kCSI_ChangeOfFieldInterruptEnable</em>&nbsp;</td><td class="fielddoc">
<p>Change of field interrupt enable. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga445b9c8db2ffe230018ced411b88cc3ead3eae43cd538d4963a92537e10857375"></a>kCSI_StatFifoOverrunInterruptEnable</em>&nbsp;</td><td class="fielddoc">
<p>STAT FIFO overrun interrupt enable. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga445b9c8db2ffe230018ced411b88cc3eabe9ee51fbfa0916ac89d43cf1dceec5a"></a>kCSI_RxFifoOverrunInterruptEnable</em>&nbsp;</td><td class="fielddoc">
<p>RXFIFO overrun interrupt enable. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga445b9c8db2ffe230018ced411b88cc3ea88e9447b7f3d6730a8817418a9149bdf"></a>kCSI_StatFifoDmaDoneInterruptEnable</em>&nbsp;</td><td class="fielddoc">
<p>STAT FIFO DMA done interrupt enable. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga445b9c8db2ffe230018ced411b88cc3ea25e1d2b38d337c7ac800a14ed153496a"></a>kCSI_StatFifoFullInterruptEnable</em>&nbsp;</td><td class="fielddoc">
<p>STAT FIFO full interrupt enable. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga445b9c8db2ffe230018ced411b88cc3eab51980279060e64d99dea0b615b1a6eb"></a>kCSI_RxBuffer1DmaDoneInterruptEnable</em>&nbsp;</td><td class="fielddoc">
<p>RX frame buffer 1 DMA transfer done. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga445b9c8db2ffe230018ced411b88cc3eaa93e6aebf81cc468b6827ecae5e996e3"></a>kCSI_RxBuffer0DmaDoneInterruptEnable</em>&nbsp;</td><td class="fielddoc">
<p>RX frame buffer 0 DMA transfer done. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga445b9c8db2ffe230018ced411b88cc3ea32b521a89db1b0a953e54ff82ddaafe1"></a>kCSI_RxFifoFullInterruptEnable</em>&nbsp;</td><td class="fielddoc">
<p>RXFIFO full interrupt enable. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga445b9c8db2ffe230018ced411b88cc3ea1f737081cd588e20b0e37adda571380a"></a>kCSI_StartOfFrameInterruptEnable</em>&nbsp;</td><td class="fielddoc">
<p>Start of frame (SOF) interrupt enable. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga445b9c8db2ffe230018ced411b88cc3ea426a30446ecdcd5a8ef11d7114587afc"></a>kCSI_EccErrorInterruptEnable</em>&nbsp;</td><td class="fielddoc">
<p>ECC error detection interrupt enable. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga445b9c8db2ffe230018ced411b88cc3eae5a566edbf0dbd027cbd20bc6649fb00"></a>kCSI_AhbResErrorInterruptEnable</em>&nbsp;</td><td class="fielddoc">
<p>AHB response Error interrupt enable. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga445b9c8db2ffe230018ced411b88cc3ea485b9acd1e879204a29e1351eef0f34b"></a>kCSI_BaseAddrChangeErrorInterruptEnable</em>&nbsp;</td><td class="fielddoc">
<p>The DMA output buffer base address changes before DMA completed. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga445b9c8db2ffe230018ced411b88cc3ea53b2171811b48986f94d99640bc293e6"></a>kCSI_Field0DoneInterruptEnable</em>&nbsp;</td><td class="fielddoc">
<p>Field 0 done interrupt enable. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga445b9c8db2ffe230018ced411b88cc3ea51b6eae094b905ec5c42f09330ab0cc2"></a>kCSI_Field1DoneInterruptEnable</em>&nbsp;</td><td class="fielddoc">
<p>Field 1 done interrupt enable. </p>
</td></tr>
</table>

</div>
</div>
<a class="anchor" id="gac962030ce8597d68455e55874a51721f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__csi__driver.html#gac962030ce8597d68455e55874a51721f">_csi_flags</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The following status register flags can be cleared:</p>
<ul>
<li>kCSI_EccErrorFlag</li>
<li>kCSI_AhbResErrorFlag</li>
<li>kCSI_ChangeOfFieldFlag</li>
<li>kCSI_StartOfFrameFlag</li>
<li>kCSI_EndOfFrameFlag</li>
<li>kCSI_RxBuffer1DmaDoneFlag</li>
<li>kCSI_RxBuffer0DmaDoneFlag</li>
<li>kCSI_StatFifoDmaDoneFlag</li>
<li>kCSI_StatFifoOverrunFlag</li>
<li>kCSI_RxFifoOverrunFlag</li>
<li>kCSI_Field0DoneFlag</li>
<li>kCSI_Field1DoneFlag</li>
<li>kCSI_BaseAddrChangeErrorFlag </li>
</ul>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="ggac962030ce8597d68455e55874a51721fa32acc9a0622596c7f830e6d70568931c"></a>kCSI_RxFifoDataReadyFlag</em>&nbsp;</td><td class="fielddoc">
<p>RXFIFO data ready. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggac962030ce8597d68455e55874a51721fa3e02610408a6ebfe221869a1923009ba"></a>kCSI_EccErrorFlag</em>&nbsp;</td><td class="fielddoc">
<p>ECC error detected. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggac962030ce8597d68455e55874a51721fa984df7af7f9825fb4659d11f42463f44"></a>kCSI_AhbResErrorFlag</em>&nbsp;</td><td class="fielddoc">
<p>Hresponse (AHB bus response) Error. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggac962030ce8597d68455e55874a51721fabe92f518f5c2f0ccbe55ebdcf4c29e89"></a>kCSI_ChangeOfFieldFlag</em>&nbsp;</td><td class="fielddoc">
<p>Change of field. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggac962030ce8597d68455e55874a51721fab337940c172c17058f8cde8bb676378f"></a>kCSI_Field0PresentFlag</em>&nbsp;</td><td class="fielddoc">
<p>Field 0 present in CCIR mode. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggac962030ce8597d68455e55874a51721fa157a47bde1ba661fdf22ca2ae61b3c0b"></a>kCSI_Field1PresentFlag</em>&nbsp;</td><td class="fielddoc">
<p>Field 1 present in CCIR mode. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggac962030ce8597d68455e55874a51721fa064c85b25c414abdeb86d501eb57360c"></a>kCSI_StartOfFrameFlag</em>&nbsp;</td><td class="fielddoc">
<p>Start of frame (SOF) detected. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggac962030ce8597d68455e55874a51721fac6409ca23ef24a10e22fb9582213f2bc"></a>kCSI_EndOfFrameFlag</em>&nbsp;</td><td class="fielddoc">
<p>End of frame (EOF) detected. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggac962030ce8597d68455e55874a51721fabdd835d96491b90bf5ae39dc5e4b0497"></a>kCSI_RxFifoFullFlag</em>&nbsp;</td><td class="fielddoc">
<p>RXFIFO full (Number of data reaches trigger level). </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggac962030ce8597d68455e55874a51721fa27f18871d1b522ca628722a3fb80b89d"></a>kCSI_RxBuffer1DmaDoneFlag</em>&nbsp;</td><td class="fielddoc">
<p>RX frame buffer 1 DMA transfer done. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggac962030ce8597d68455e55874a51721fa3168d94660e46e761c0639a1a20b74ee"></a>kCSI_RxBuffer0DmaDoneFlag</em>&nbsp;</td><td class="fielddoc">
<p>RX frame buffer 0 DMA transfer done. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggac962030ce8597d68455e55874a51721fa920018020044eb07e3ffed1f423208a5"></a>kCSI_StatFifoFullFlag</em>&nbsp;</td><td class="fielddoc">
<p>STAT FIFO full (Reach trigger level). </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggac962030ce8597d68455e55874a51721fa961784728b693f7741adb7b17ebe425b"></a>kCSI_StatFifoDmaDoneFlag</em>&nbsp;</td><td class="fielddoc">
<p>STAT FIFO DMA transfer done. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggac962030ce8597d68455e55874a51721fa0350ec81b55a8180eaffcd8b1f537cdf"></a>kCSI_StatFifoOverrunFlag</em>&nbsp;</td><td class="fielddoc">
<p>STAT FIFO overrun. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggac962030ce8597d68455e55874a51721fab01731bc864c9b47644a6de2bc2f88d5"></a>kCSI_RxFifoOverrunFlag</em>&nbsp;</td><td class="fielddoc">
<p>RXFIFO overrun. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggac962030ce8597d68455e55874a51721fa2676d308e2677cc91f47ae0661355d10"></a>kCSI_Field0DoneFlag</em>&nbsp;</td><td class="fielddoc">
<p>Field 0 transfer done. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggac962030ce8597d68455e55874a51721fa6e7f6d415b0e9848c2f33f25ea9c0036"></a>kCSI_Field1DoneFlag</em>&nbsp;</td><td class="fielddoc">
<p>Field 1 transfer done. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ggac962030ce8597d68455e55874a51721fa254be4a91697e3bf3146a663454c2e60"></a>kCSI_BaseAddrChangeErrorFlag</em>&nbsp;</td><td class="fielddoc">
<p>The DMA output buffer base address changes before DMA completed. </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga6ab1581b894e0addd36e259454d894fb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">status_t CSI_Init </td>
          <td>(</td>
          <td class="paramtype">CSI_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__csi__driver.html#structcsi__config__t">csi_config_t</a> *&#160;</td>
          <td class="paramname"><em>config</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function enables the CSI peripheral clock, and resets the CSI registers.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>CSI peripheral base address. </td></tr>
    <tr><td class="paramname">config</td><td>Pointer to the configuration structure.</td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">kStatus_Success</td><td>Initialize successfully. </td></tr>
    <tr><td class="paramname">kStatus_InvalidArgument</td><td>Initialize failed because of invalid argument. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga29130aa6333127427e9945203a941c31"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CSI_Deinit </td>
          <td>(</td>
          <td class="paramtype">CSI_Type *&#160;</td>
          <td class="paramname"><em>base</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function disables the CSI peripheral clock.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>CSI peripheral base address. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gaaf0c3b036356a13b113c190762035317"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CSI_Reset </td>
          <td>(</td>
          <td class="paramtype">CSI_Type *&#160;</td>
          <td class="paramname"><em>base</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function resets the CSI peripheral registers to default status.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>CSI peripheral base address. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga44bd4343d5866367abc152651f3d8a03"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CSI_GetDefaultConfig </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__csi__driver.html#structcsi__config__t">csi_config_t</a> *&#160;</td>
          <td class="paramname"><em>config</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The default configuration value is:</p>
<div class="fragment"><div class="line">config-&gt;width = 320U;</div>
<div class="line">config-&gt;height = 240U;</div>
<div class="line">config-&gt;polarityFlags = <a class="code" href="group__csi__driver.html#ggafda41057e6d13039ca0d139b89abde64aab952a4e21500ee629a8bd16ece03b3f">kCSI_HsyncActiveHigh</a> | <a class="code" href="group__csi__driver.html#ggafda41057e6d13039ca0d139b89abde64aa98b2058628ba0d2bff537f81df0bfc9">kCSI_DataLatchOnRisingEdge</a>;</div>
<div class="line">config-&gt;bytesPerPixel = 2U;</div>
<div class="line">config-&gt;linePitch_Bytes = 320U * 2U;</div>
<div class="line">config-&gt;workMode = <a class="code" href="group__csi__driver.html#gga5539d9ae21ae84983a8ed9418c83cc5fab707b88b2c5b3ca70afe6b78f2988571">kCSI_GatedClockMode</a>;</div>
<div class="line">config-&gt;dataBus = <a class="code" href="group__csi__driver.html#ggab69baf9a3cfb4a7be68e3ba250716df5ae6e9f2234f6b659241d9d504457e04dd">kCSI_DataBus8Bit</a>;</div>
<div class="line">config-&gt;useExtVsync = <span class="keyword">true</span>;</div>
</div><!-- fragment --><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">config</td><td>Pointer to the CSI configuration. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gaa9a972883f2e04aefb94bac426fa9c72"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CSI_ClearFifo </td>
          <td>(</td>
          <td class="paramtype">CSI_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__csi__driver.html#gaf354282828a94ddb23079e6e98399520">csi_fifo_t</a>&#160;</td>
          <td class="paramname"><em>fifo</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function clears the CSI FIFO.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>CSI peripheral base address. </td></tr>
    <tr><td class="paramname">fifo</td><td>The FIFO to clear. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gabd61e583724350ad66feacf6cb55e86c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CSI_ReflashFifoDma </td>
          <td>(</td>
          <td class="paramtype">CSI_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__csi__driver.html#gaf354282828a94ddb23079e6e98399520">csi_fifo_t</a>&#160;</td>
          <td class="paramname"><em>fifo</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function reflashes the CSI FIFO DMA.</p>
<p>For RXFIFO, there are two frame buffers. When the CSI module started, it saves the frames to frame buffer 0 then frame buffer 1, the two buffers will be written by turns. After reflash DMA using this function, the CSI is reset to save frame to buffer 0.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>CSI peripheral base address. </td></tr>
    <tr><td class="paramname">fifo</td><td>The FIFO DMA to reflash. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga266530ad9e8aa0e0e4977317b5cd9899"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CSI_EnableFifoDmaRequest </td>
          <td>(</td>
          <td class="paramtype">CSI_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__csi__driver.html#gaf354282828a94ddb23079e6e98399520">csi_fifo_t</a>&#160;</td>
          <td class="paramname"><em>fifo</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>enable</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>CSI peripheral base address. </td></tr>
    <tr><td class="paramname">fifo</td><td>The FIFO DMA reques to enable or disable. </td></tr>
    <tr><td class="paramname">enable</td><td>True to enable, false to disable. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gace757ddd954a29a1a11c0bdc119b17ad"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void CSI_Start </td>
          <td>(</td>
          <td class="paramtype">CSI_Type *&#160;</td>
          <td class="paramname"><em>base</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>CSI peripheral base address. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga49731f4255e64f48eb0f26628296c13e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void CSI_Stop </td>
          <td>(</td>
          <td class="paramtype">CSI_Type *&#160;</td>
          <td class="paramname"><em>base</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>CSI peripheral base address. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga17f23deb7d61ad8d88b10165e512d50d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CSI_SetRxBufferAddr </td>
          <td>(</td>
          <td class="paramtype">CSI_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>addr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>CSI peripheral base address. </td></tr>
    <tr><td class="paramname">index</td><td>Buffer index. </td></tr>
    <tr><td class="paramname">addr</td><td>Frame buffer address to set. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga433cf3d4d36b2d602b2e41b415abd85f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CSI_EnableInterrupts </td>
          <td>(</td>
          <td class="paramtype">CSI_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>mask</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>CSI peripheral base address. </td></tr>
    <tr><td class="paramname">mask</td><td>The interrupts to enable, pass in as OR'ed value of <a class="el" href="group__csi__driver.html#ga445b9c8db2ffe230018ced411b88cc3e">_csi_interrupt_enable</a>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gaaef95a89e63407cdb28b9dbf81ce4fe5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CSI_DisableInterrupts </td>
          <td>(</td>
          <td class="paramtype">CSI_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>mask</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>CSI peripheral base address. </td></tr>
    <tr><td class="paramname">mask</td><td>The interrupts to disable, pass in as OR'ed value of <a class="el" href="group__csi__driver.html#ga445b9c8db2ffe230018ced411b88cc3e">_csi_interrupt_enable</a>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gac756a072ac5afdb9567632d02d13e73f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static uint32_t CSI_GetStatusFlags </td>
          <td>(</td>
          <td class="paramtype">CSI_Type *&#160;</td>
          <td class="paramname"><em>base</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>CSI peripheral base address. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>status flag, it is OR'ed value of <a class="el" href="group__csi__driver.html#gac962030ce8597d68455e55874a51721f">_csi_flags</a>. </dd></dl>

</div>
</div>
<a class="anchor" id="ga9368862568891bbdb29b0a6287801506"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void CSI_ClearStatusFlags </td>
          <td>(</td>
          <td class="paramtype">CSI_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>statusMask</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>The flags to clear are passed in as OR'ed value of <a class="el" href="group__csi__driver.html#gac962030ce8597d68455e55874a51721f">_csi_flags</a>. The following flags are cleared automatically by hardware:</p>
<ul>
<li><a class="el" href="group__csi__driver.html#ggac962030ce8597d68455e55874a51721fabdd835d96491b90bf5ae39dc5e4b0497">kCSI_RxFifoFullFlag</a>,</li>
<li><a class="el" href="group__csi__driver.html#ggac962030ce8597d68455e55874a51721fa920018020044eb07e3ffed1f423208a5">kCSI_StatFifoFullFlag</a>,</li>
<li><a class="el" href="group__csi__driver.html#ggac962030ce8597d68455e55874a51721fab337940c172c17058f8cde8bb676378f">kCSI_Field0PresentFlag</a>,</li>
<li><a class="el" href="group__csi__driver.html#ggac962030ce8597d68455e55874a51721fa157a47bde1ba661fdf22ca2ae61b3c0b">kCSI_Field1PresentFlag</a>,</li>
<li><a class="el" href="group__csi__driver.html#ggac962030ce8597d68455e55874a51721fa32acc9a0622596c7f830e6d70568931c">kCSI_RxFifoDataReadyFlag</a>,</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>CSI peripheral base address. </td></tr>
    <tr><td class="paramname">statusMask</td><td>The status flags mask, OR'ed value of <a class="el" href="group__csi__driver.html#gac962030ce8597d68455e55874a51721f">_csi_flags</a>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gaff15e4c1cd458f686e4f296ce3d417d5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">status_t CSI_TransferCreateHandle </td>
          <td>(</td>
          <td class="paramtype">CSI_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">csi_handle_t *&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__csi__driver.html#ga68a7e9c86a91b7ffb6547cf762ef6f3f">csi_transfer_callback_t</a>&#160;</td>
          <td class="paramname"><em>callback</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>userData</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function initializes CSI handle, it should be called before any other CSI transactional functions.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>CSI peripheral base address. </td></tr>
    <tr><td class="paramname">handle</td><td>Pointer to the handle structure. </td></tr>
    <tr><td class="paramname">callback</td><td>Callback function for CSI transfer. </td></tr>
    <tr><td class="paramname">userData</td><td>Callback function parameter.</td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">kStatus_Success</td><td>Handle created successfully. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga65a17c86c64297a09857e435588a65d6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">status_t CSI_TransferStart </td>
          <td>(</td>
          <td class="paramtype">CSI_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">csi_handle_t *&#160;</td>
          <td class="paramname"><em>handle</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>When the empty frame buffers have been submit to CSI driver using function <a class="el" href="group__csi__driver.html#ga807a6677a22856cf8ad1e37253b14d44">CSI_TransferSubmitEmptyBuffer</a>, user could call this function to start the transfer. The incoming frame will be saved to the empty frame buffer, and user could be optionally notified through callback function.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>CSI peripheral base address. </td></tr>
    <tr><td class="paramname">handle</td><td>Pointer to the handle structure.</td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">kStatus_Success</td><td>Started successfully. </td></tr>
    <tr><td class="paramname">kStatus_CSI_NoEmptyBuffer</td><td>Could not start because no empty frame buffer in queue. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gac20498234465760225985287ff862751"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">status_t CSI_TransferStop </td>
          <td>(</td>
          <td class="paramtype">CSI_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">csi_handle_t *&#160;</td>
          <td class="paramname"><em>handle</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The driver does not clean the full frame buffers in queue. In other words, after calling this function, user still could get the full frame buffers in queue using function <a class="el" href="group__csi__driver.html#ga36f7bf646f55c098fb12d6fa387d6424">CSI_TransferGetFullBuffer</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>CSI peripheral base address. </td></tr>
    <tr><td class="paramname">handle</td><td>Pointer to the handle structure.</td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">kStatus_Success</td><td>Stoped successfully. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga807a6677a22856cf8ad1e37253b14d44"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">status_t CSI_TransferSubmitEmptyBuffer </td>
          <td>(</td>
          <td class="paramtype">CSI_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">csi_handle_t *&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>frameBuffer</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function could be called before <a class="el" href="group__csi__driver.html#ga65a17c86c64297a09857e435588a65d6">CSI_TransferStart</a> or after <a class="el" href="group__csi__driver.html#ga65a17c86c64297a09857e435588a65d6">CSI_TransferStart</a>. If there is no room in queue to store the empty frame buffer, this function returns error.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>CSI peripheral base address. </td></tr>
    <tr><td class="paramname">handle</td><td>Pointer to the handle structure. </td></tr>
    <tr><td class="paramname">frameBuffer</td><td>Empty frame buffer to submit.</td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">kStatus_Success</td><td>Started successfully. </td></tr>
    <tr><td class="paramname">kStatus_CSI_QueueFull</td><td>Could not submit because there is no room in queue. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga36f7bf646f55c098fb12d6fa387d6424"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">status_t CSI_TransferGetFullBuffer </td>
          <td>(</td>
          <td class="paramtype">CSI_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">csi_handle_t *&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t *&#160;</td>
          <td class="paramname"><em>frameBuffer</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>After the transfer started using function <a class="el" href="group__csi__driver.html#ga65a17c86c64297a09857e435588a65d6">CSI_TransferStart</a>, the incoming frames will be saved to the empty frame buffers in queue. This function gets the full-filled frame buffer from the queue. If there is no full frame buffer in queue, this function returns error.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>CSI peripheral base address. </td></tr>
    <tr><td class="paramname">handle</td><td>Pointer to the handle structure. </td></tr>
    <tr><td class="paramname">frameBuffer</td><td>Full frame buffer.</td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">kStatus_Success</td><td>Started successfully. </td></tr>
    <tr><td class="paramname">kStatus_CSI_NoFullBuffer</td><td>There is no full frame buffer in queue. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gaa8118210b401dacd2257dbb75c6a6310"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CSI_TransferHandleIRQ </td>
          <td>(</td>
          <td class="paramtype">CSI_Type *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">csi_handle_t *&#160;</td>
          <td class="paramname"><em>handle</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function handles the CSI IRQ request to work with CSI driver transactional APIs.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>CSI peripheral base address. </td></tr>
    <tr><td class="paramname">handle</td><td>CSI handle pointer. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.5-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul class="foot">
    <li class="footer">&copy; 2016 NXP Semiconductors. All rights reserved.
    </li>
  </ul>
</div>
</body>
</html>
